﻿using System.Configuration;

namespace PhantomDb.Config.Configuration
{
    [ConfigurationCollection(typeof(Schema), AddItemName = "Schema", CollectionType = ConfigurationElementCollectionType.BasicMap)]
    public class Schemas : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new Schema();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            var schema = element as Schema;

            return schema.Name;
        }
    }
}
